﻿@{
    ViewData["Title"] = "Home Page";
    Layout = "~/Views/_ViewImports.cshtml";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>


<a src="#" id="test" class="layui-btn power-show" lay-menu-code="HomeAction:test">测试授权</a>

<script>
    layui.use(['comment'],function(){

        var comment = layui.comment
           ,$ = layui.$;

        comment.CheckPermission();
        $('#test').click(function(){
            comment._ACP(ApiUrl.Home.homeTest, {}, function (res) {
                if(res.success){
                    layer.msg(res.result);
                }else
                {
                    layer.msg(res.errorMsg);
                }
            })
        })

    })
</script>